local xingshang = fk.CreateSkill {

  name = "joy__xingshang",

  tags = {  },

}



xingshang:addEffect(fk.Death, {
  name = "joy__xingshang",
  anim_type = "drawcard",
  events = {fk.Death},
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(xingshang.name) and not target:isNude()
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:broadcastSkillInvoke("fangzhu")
    local cards = target:getCardIds{Player.Hand, Player.Equip}
    if #cards > 0 then
      local dummy = Fk:cloneCard'slash'
      dummy:addSubcards(cards)
      room:obtainCard(player, dummy, false, fk.ReasonPrey)
    end
    if not player.dead then
      player:drawCards(1, xingshang.name)
    end
  end,
})

return xingshang